import request from "@/utils/request"

// asin管理  列表
export const asinManagementList = (data) =>
  request({
    url: "/v1/base/asin-management/list",
    method: "post",
    data,
  })
// asin管理  asin详情
export const asinManagementDetail = (data) =>
  request({
    url: "/v1/base/asin-management/detail",
    method: "post",
    data,
  })

// asin管理  新增
export const asinManagementCreate = (data) =>
  request({
    url: "/v1/base/asin-management/create",
    method: "post",
    data,
  })
// asin管理  修改
export const asinManagementEdit = (data) =>
  request({
    url: "/v1/base/asin-management/edit",
    method: "post",
    data,
  })

// asin管理  批量修改运输类型
export const asinManagementBatchUpdateField = (data) =>
  request({
    url: "/v1/base/asin-management/batch-update-a-field",
    method: "post",
    data,
  })
// asin管理  操作日志
export const asinManagementLog = (data) =>
  request({
    url: "/v1/base/asin-management/log",
    method: "post",
    data,
  })
// asin管理  asin导入
export const asinManagementImport = (data) =>
  request({
    url: "/v1/base/asin-management/import",
    method: "post",
    data,
    responseType: "arraybuffer",
  })

// asin管理  asin销量趋势
export const asinManagementSalesTrend = (data) =>
  request({
    url: "/v1/base/asin-management/sales-trend",
    method: "post",
    data,
  })

// asin管理  手动同步
export const asinManagementManuallySync = (data) =>
  request({
    url: "/v1/base/asin-management/manually-sync",
    method: "post",
    data,
  })

// asin策略 列表
export const asinStrategyList = (data) =>
  request({
    url: "/v1/base/asin-strategy/list",
    method: "post",
    data,
  })

// asin策略 详情
export const asinStrategyDetail = (data) =>
  request({
    url: "/v1/base/asin-strategy/detail",
    method: "post",
    data,
  })
// asin策略 创建
export const asinStrategyCreate = (data) =>
  request({
    url: "/v1/base/asin-strategy/create",
    method: "post",
    data,
  })
// asin策略 修改
export const asinStrategyEdit = (data) =>
  request({
    url: "/v1/base/asin-strategy/edit",
    method: "post",
    data,
  })
// asin策略 删除
export const asinStrategyDelete = (data) =>
  request({
    url: "/v1/base/asin-strategy/delete",
    method: "post",
    data,
  })
// asin策略 操作日志
export const asinStrategyLog = (data) =>
  request({
    url: "/v1/base/asin-strategy/log",
    method: "post",
    data,
  })
// asin策略 修改状态
export const batchUpdateAField = (data) =>
  request({
    url: "/v1/base/asin-strategy/batch-update-a-field",
    method: "post",
    data,
  })
// asin策略 获取已使用的分类
export const usedCategory = (data) =>
  request({
    url: "/v1/base/asin-strategy/used-category",
    method: "post",
    data,
  })

// // asin管理  XXXX
// export const amazonSkuDetail = (data) =>
//   request({
//     url: "/v1/goods/sku/amazon-sku-detail",
//     method: "post",
//     data,
//   })

// 库存周转天数目标配置 列表
export function stockingConfigList(params) {
  return request({
    url: `/v1/base/stocking-config/list`,
    method: "get",
    params,
  })
}
// 库存周转天数目标配置 导入
export function stockingConfigImport(data) {
  return request({
    url: `/v1/base/stocking-config/import`,
    method: "post",
    data,
    responseType: "arraybuffer",
  })
}

// 库存周转天数目标配置 新增
export const stockingConfigCreate = (data) =>
  request({
    url: "/v1/base/stocking-config/create",
    method: "post",
    data,
  })

// 库存周转天数目标配置 编辑
export const stockingConfigEdit = (data) =>
  request({
    url: "/v1/base/stocking-config/edit",
    method: "post",
    data,
  })

// 备货参数设置 保存
export const predictSalesSave = (data) =>
  request({
    url: "/v1/base/predict-sales/save",
    method: "post",
    data,
  })
// 备货参数配置 信息获取
export function predictSalesInfo(params) {
  return request({
    url: `/v1/base/predict-sales/info`,
    method: "get",
    params,
  })
}
// 备货参数配置 智能补货枚举值
export function predictSalesEnum(params) {
  return request({
    url: `/v1/base/predict-sales/enum`,
    method: "get",
    params,
  })
}

// 计划员列表
export const plannerConfigList = (data) =>
  request({
    url: "/v1/base/planner-config/list",
    method: "post",
    data,
  })

// 计划员配置 新增
export const plannerConfigCreate = (data) =>
  request({
    url: "/v1/base/planner-config/create",
    method: "post",
    data,
  })

// 计划员配置 编辑
export const plannerConfigEdit = (data) =>
  request({
    url: "/v1/base/planner-config/edit",
    method: "post",
    data,
  })
// // 获取字段映射关系
// export function getOption(params) {
//   return request({
//     url: `/v1/base/get-option`,
//     method: "get",
//     params,
//   });
// }

// //获取下拉选项数据
// export const overallOptions = (data) =>
//   request({
//     url: "/options",
//     method: "post",
//     data,
//   });
